#define _CRT_SECURE_NO_WARNINGS 2

#include<iostream>
using namespace std;

void test1(int& x) {
	cout << x << endl;
	if (x == 4) {
		return;
	}
	++x;
	test1(x);
	test1(x);
}

int main() {
	int x = 0;
	test1(x);
	return 0;
}